3.2.85 \(\int x (d+e x^2)^2 (a+b \log (c x^n)) \, dx\) [185]

Optimal. Leaf size=76 \[ -\frac {1}{4} b d^2 n x^2-\frac {1}{8} b d e n x^4-\frac {1}{36} b e^2 n x^6-\frac {b d^3 n \log (x)}{6 e}+\frac {\left (d+e x^2\right )^3 \left (a+b \log \left (c x^n\right )\right )}{6 e} \]

[Out]

-1/4*b*d^2*n*x^2-1/8*b*d*e*n*x^4-1/36*b*e^2*n*x^6-1/6*b*d^3*n*ln(x)/e+1/6*(e*x^2+d)^3*(a+b*ln(c*x^n))/e

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {267, 2371, 12, 272, 45} \begin {gather*} \frac {\left (d+e x^2\right )^3 \left (a+b \log \left (c x^n\right )\right )}{6 e}-\frac {b d^3 n \log (x)}{6 e}-\frac {1}{4} b d^2 n x^2-\frac {1}{8} b d e n x^4-\frac {1}{36} b e^2 n x^6 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x*(d + e*x^2)^2*(a + b*Log[c*x^n]),x]

[Out]

-1/4*(b*d^2*n*x^2) - (b*d*e*n*x^4)/8 - (b*e^2*n*x^6)/36 - (b*d^3*n*Log[x])/(6*e) + ((d + e*x^2)^3*(a + b*Log[c
*x^n]))/(6*e)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 267

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a + b*x^n)^(p + 1)/(b*n*(p + 1)), x] /; FreeQ
[{a, b, m, n, p}, x] && EqQ[m, n - 1] && NeQ[p, -1]

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 2371

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IGtQ[m, 0]

Rubi steps

\begin {align*} \int x \left (d+e x^2\right )^2 \left (a+b \log \left (c x^n\right )\right ) \, dx &=\frac {\left (d+e x^2\right )^3 \left (a+b \log \left (c x^n\right )\right )}{6 e}-(b n) \int \frac {\left (d+e x^2\right )^3}{6 e x} \, dx\\ &=\frac {\left (d+e x^2\right )^3 \left (a+b \log \left (c x^n\right )\right )}{6 e}-\frac {(b n) \int \frac {\left (d+e x^2\right )^3}{x} \, dx}{6 e}\\ &=\frac {\left (d+e x^2\right )^3 \left (a+b \log \left (c x^n\right )\right )}{6 e}-\frac {(b n) \text {Subst}\left (\int \frac {(d+e x)^3}{x} \, dx,x,x^2\right )}{12 e}\\ &=\frac {\left (d+e x^2\right )^3 \left (a+b \log \left (c x^n\right )\right )}{6 e}-\frac {(b n) \text {Subst}\left (\int \left (3 d^2 e+\frac {d^3}{x}+3 d e^2 x+e^3 x^2\right ) \, dx,x,x^2\right )}{12 e}\\ &=-\frac {1}{4} b d^2 n x^2-\frac {1}{8} b d e n x^4-\frac {1}{36} b e^2 n x^6-\frac {b d^3 n \log (x)}{6 e}+\frac {\left (d+e x^2\right )^3 \left (a+b \log \left (c x^n\right )\right )}{6 e}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 85, normalized size = 1.12 \begin {gather*} \frac {1}{72} x^2 \left (12 a \left (3 d^2+3 d e x^2+e^2 x^4\right )-b n \left (18 d^2+9 d e x^2+2 e^2 x^4\right )+12 b \left (3 d^2+3 d e x^2+e^2 x^4\right ) \log \left (c x^n\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x*(d + e*x^2)^2*(a + b*Log[c*x^n]),x]

[Out]

(x^2*(12*a*(3*d^2 + 3*d*e*x^2 + e^2*x^4) - b*n*(18*d^2 + 9*d*e*x^2 + 2*e^2*x^4) + 12*b*(3*d^2 + 3*d*e*x^2 + e^
2*x^4)*Log[c*x^n]))/72

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.18, size = 434, normalized size = 5.71

method result size
risch \(\frac {\left (e \,x^{2}+d \right )^{3} b \ln \left (x^{n}\right )}{6 e}+\frac {i \pi b \,d^{2} x^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{4}-\frac {i \pi b \,d^{2} x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{4}-\frac {i \pi b \,d^{2} x^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{4}+\frac {i e^{2} \pi b \,x^{6} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{12}-\frac {i e \pi b d \,x^{4} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{4}-\frac {i e^{2} \pi b \,x^{6} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{12}+\frac {i \pi b \,d^{2} x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{4}+\frac {i e \pi b d \,x^{4} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{4}+\frac {\ln \left (c \right ) b \,e^{2} x^{6}}{6}-\frac {i e \pi b d \,x^{4} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{4}-\frac {i e^{2} \pi b \,x^{6} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{12}+\frac {i e \pi b d \,x^{4} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{4}+\frac {i e^{2} \pi b \,x^{6} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{12}-\frac {b \,e^{2} n \,x^{6}}{36}+\frac {x^{6} a \,e^{2}}{6}+\frac {\ln \left (c \right ) b d e \,x^{4}}{2}-\frac {b d e n \,x^{4}}{8}+\frac {x^{4} a d e}{2}+\frac {\ln \left (c \right ) b \,d^{2} x^{2}}{2}-\frac {b \,d^{2} n \,x^{2}}{4}-\frac {b \,d^{3} n \ln \left (x \right )}{6 e}+\frac {x^{2} a \,d^{2}}{2}\) \(434\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(e*x^2+d)^2*(a+b*ln(c*x^n)),x,method=_RETURNVERBOSE)

[Out]

1/6*(e*x^2+d)^3*b/e*ln(x^n)+1/4*I*Pi*b*d^2*x^2*csgn(I*x^n)*csgn(I*c*x^n)^2-1/4*I*Pi*b*d^2*x^2*csgn(I*c)*csgn(I
*x^n)*csgn(I*c*x^n)-1/4*I*Pi*b*d^2*x^2*csgn(I*c*x^n)^3+1/12*I*e^2*Pi*b*x^6*csgn(I*x^n)*csgn(I*c*x^n)^2-1/4*I*e
*Pi*b*d*x^4*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-1/12*I*e^2*Pi*b*x^6*csgn(I*c*x^n)^3+1/4*I*Pi*b*d^2*x^2*csgn(I*
c)*csgn(I*c*x^n)^2+1/4*I*e*Pi*b*d*x^4*csgn(I*c)*csgn(I*c*x^n)^2+1/6*ln(c)*b*e^2*x^6-1/4*I*e*Pi*b*d*x^4*csgn(I*
c*x^n)^3-1/12*I*e^2*Pi*b*x^6*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+1/4*I*e*Pi*b*d*x^4*csgn(I*x^n)*csgn(I*c*x^n)^
2+1/12*I*e^2*Pi*b*x^6*csgn(I*c)*csgn(I*c*x^n)^2-1/36*b*e^2*n*x^6+1/6*x^6*a*e^2+1/2*ln(c)*b*d*e*x^4-1/8*b*d*e*n
*x^4+1/2*x^4*a*d*e+1/2*ln(c)*b*d^2*x^2-1/4*b*d^2*n*x^2-1/6*b*d^3*n*ln(x)/e+1/2*x^2*a*d^2

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 100, normalized size = 1.32 \begin {gather*} -\frac {1}{36} \, b n x^{6} e^{2} + \frac {1}{6} \, b x^{6} e^{2} \log \left (c x^{n}\right ) + \frac {1}{6} \, a x^{6} e^{2} - \frac {1}{8} \, b d n x^{4} e + \frac {1}{2} \, b d x^{4} e \log \left (c x^{n}\right ) + \frac {1}{2} \, a d x^{4} e - \frac {1}{4} \, b d^{2} n x^{2} + \frac {1}{2} \, b d^{2} x^{2} \log \left (c x^{n}\right ) + \frac {1}{2} \, a d^{2} x^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(e*x^2+d)^2*(a+b*log(c*x^n)),x, algorithm="maxima")

[Out]

-1/36*b*n*x^6*e^2 + 1/6*b*x^6*e^2*log(c*x^n) + 1/6*a*x^6*e^2 - 1/8*b*d*n*x^4*e + 1/2*b*d*x^4*e*log(c*x^n) + 1/
2*a*d*x^4*e - 1/4*b*d^2*n*x^2 + 1/2*b*d^2*x^2*log(c*x^n) + 1/2*a*d^2*x^2

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 112, normalized size = 1.47 \begin {gather*} -\frac {1}{36} \, {\left (b n - 6 \, a\right )} x^{6} e^{2} - \frac {1}{8} \, {\left (b d n - 4 \, a d\right )} x^{4} e - \frac {1}{4} \, {\left (b d^{2} n - 2 \, a d^{2}\right )} x^{2} + \frac {1}{6} \, {\left (b x^{6} e^{2} + 3 \, b d x^{4} e + 3 \, b d^{2} x^{2}\right )} \log \left (c\right ) + \frac {1}{6} \, {\left (b n x^{6} e^{2} + 3 \, b d n x^{4} e + 3 \, b d^{2} n x^{2}\right )} \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(e*x^2+d)^2*(a+b*log(c*x^n)),x, algorithm="fricas")

[Out]

-1/36*(b*n - 6*a)*x^6*e^2 - 1/8*(b*d*n - 4*a*d)*x^4*e - 1/4*(b*d^2*n - 2*a*d^2)*x^2 + 1/6*(b*x^6*e^2 + 3*b*d*x
^4*e + 3*b*d^2*x^2)*log(c) + 1/6*(b*n*x^6*e^2 + 3*b*d*n*x^4*e + 3*b*d^2*n*x^2)*log(x)

________________________________________________________________________________________

Sympy [A]
time = 0.63, size = 116, normalized size = 1.53 \begin {gather*} \frac {a d^{2} x^{2}}{2} + \frac {a d e x^{4}}{2} + \frac {a e^{2} x^{6}}{6} - \frac {b d^{2} n x^{2}}{4} + \frac {b d^{2} x^{2} \log {\left (c x^{n} \right )}}{2} - \frac {b d e n x^{4}}{8} + \frac {b d e x^{4} \log {\left (c x^{n} \right )}}{2} - \frac {b e^{2} n x^{6}}{36} + \frac {b e^{2} x^{6} \log {\left (c x^{n} \right )}}{6} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(e*x**2+d)**2*(a+b*ln(c*x**n)),x)

[Out]

a*d**2*x**2/2 + a*d*e*x**4/2 + a*e**2*x**6/6 - b*d**2*n*x**2/4 + b*d**2*x**2*log(c*x**n)/2 - b*d*e*n*x**4/8 +
b*d*e*x**4*log(c*x**n)/2 - b*e**2*n*x**6/36 + b*e**2*x**6*log(c*x**n)/6

________________________________________________________________________________________

Giac [A]
time = 6.88, size = 123, normalized size = 1.62 \begin {gather*} \frac {1}{6} \, b n x^{6} e^{2} \log \left (x\right ) - \frac {1}{36} \, b n x^{6} e^{2} + \frac {1}{6} \, b x^{6} e^{2} \log \left (c\right ) + \frac {1}{2} \, b d n x^{4} e \log \left (x\right ) + \frac {1}{6} \, a x^{6} e^{2} - \frac {1}{8} \, b d n x^{4} e + \frac {1}{2} \, b d x^{4} e \log \left (c\right ) + \frac {1}{2} \, a d x^{4} e + \frac {1}{2} \, b d^{2} n x^{2} \log \left (x\right ) - \frac {1}{4} \, b d^{2} n x^{2} + \frac {1}{2} \, b d^{2} x^{2} \log \left (c\right ) + \frac {1}{2} \, a d^{2} x^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(e*x^2+d)^2*(a+b*log(c*x^n)),x, algorithm="giac")

[Out]

1/6*b*n*x^6*e^2*log(x) - 1/36*b*n*x^6*e^2 + 1/6*b*x^6*e^2*log(c) + 1/2*b*d*n*x^4*e*log(x) + 1/6*a*x^6*e^2 - 1/
8*b*d*n*x^4*e + 1/2*b*d*x^4*e*log(c) + 1/2*a*d*x^4*e + 1/2*b*d^2*n*x^2*log(x) - 1/4*b*d^2*n*x^2 + 1/2*b*d^2*x^
2*log(c) + 1/2*a*d^2*x^2

________________________________________________________________________________________

Mupad [B]
time = 3.63, size = 82, normalized size = 1.08 \begin {gather*} \ln \left (c\,x^n\right )\,\left (\frac {b\,d^2\,x^2}{2}+\frac {b\,d\,e\,x^4}{2}+\frac {b\,e^2\,x^6}{6}\right )+\frac {d^2\,x^2\,\left (2\,a-b\,n\right )}{4}+\frac {e^2\,x^6\,\left (6\,a-b\,n\right )}{36}+\frac {d\,e\,x^4\,\left (4\,a-b\,n\right )}{8} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(d + e*x^2)^2*(a + b*log(c*x^n)),x)

[Out]

log(c*x^n)*((b*d^2*x^2)/2 + (b*e^2*x^6)/6 + (b*d*e*x^4)/2) + (d^2*x^2*(2*a - b*n))/4 + (e^2*x^6*(6*a - b*n))/3
6 + (d*e*x^4*(4*a - b*n))/8

________________________________________________________________________________________